package com.ybwh.springboot2.exmple.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import com.alibaba.fastjson.JSON;


/**
 * <p>
 * 系统功能
 * </p>
 *
 * @author fanbeibei
 * @since 2023-07-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_func")
@ApiModel(value="SysFunc对象", description="系统功能")
public class SysFunc implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "唯一编码")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "显示名称")
    @TableField("text")
    private String text;

    @ApiModelProperty(value = "menu-菜单;button-按钮;api-功能接口")
    @TableField("type")
    private String type;

    @ApiModelProperty(value = "父级ID")
    @TableField("parent_id")
    private Long parentId;

    @ApiModelProperty(value = "id路径,从顶级祖先id到自己id,以/开头,用/分隔")
    @TableField("id_path")
    private String idPath;

    @ApiModelProperty(value = "是否删除(非0-是,0-否)")
    @TableField("deleted")
    @TableLogic
    private Long deleted;

    @ApiModelProperty(value = "创建人")
    @TableField("create_id")
    private Long createId;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新人")
    @TableField("update_id")
    private Long updateId;

    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    private LocalDateTime updateTime;


    public static final String ID = "id";

    public static final String CODE = "code";

    public static final String TEXT = "text";

    public static final String TYPE = "type";

    public static final String PARENT_ID = "parent_id";

    public static final String ID_PATH = "id_path";

    public static final String DELETED = "deleted";

    public static final String CREATE_ID = "create_id";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_ID = "update_id";

    public static final String UPDATE_TIME = "update_time";





    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }

}
